#ifndef GAMEADD_H
#define GAMEADD_H

#include <QFrame>
#include "datamodel.h"
#include <QTimer>

namespace Ui {
    class GameAdd;
}

class GameAdd : public QFrame
{
    Q_OBJECT

public:
    explicit GameAdd(DataModel *model,QWidget *parent = 0);
    void setupUi();

    ~GameAdd();

signals:
    void changeLock(bool b);
    void changeItem();
    void resetUi();
    void buildInitGameSI(const int &id);
    void syncGameSI(const int &id);
    void delGameSI(const int &id);
private slots:
    void lockPage();
    void buildTimerCallBack();
    void on_btn_save_add_clicked();
    void on_btn_selectGame_add_clicked();

    void on_pushButton_7_clicked();

    void on_btn_selectGameICO_add_clicked();

    void on_btn_selectRunPath_add_clicked();

    void on_btn_startBuild_clicked();

    void on_btn_openGameDir_clicked();

    void on_btn_init_clicked();

    void on_btn_sync_clicked();

    void on_btn_ensure_clicked();

    void on_btn_cancel_clicked();

private:
    Ui::GameAdd *ui;
    DataModel *model;
    QTimer *build_timer;
    int buildPbrValue;
};

#endif // GAMEADD_H
